package abc.hd.com.sersiona.sersiona;

import abc.hd.com.dao.daouser;
import abc.hd.com.entity.uusera;
import abc.hd.com.sersiona.aer;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class aerimpl implements aer {
    @Autowired
private daouser daouser;
    @Override
    public List<uusera> allat() {
        List<uusera> getalldata = daouser.getalldata ();
        return getalldata;
    }

    @Override
    public PageInfo<uusera> allpagedata(Integer a) {
        PageHelper.startPage (a, 2);
        List<uusera> getalldata = daouser.getalldata ();
        PageInfo<uusera> av=new PageInfo<> (getalldata);
        return av;
    }
}
